<?php

namespace app\validate;

use think\facade\Request;
use think\Validate;

/**
 * tms账单管理
 */
class XlBillManagementValidate extends Validate
{
    protected $rule = [
        'id' => 'require',
        'no' => 'require',
        'car_plate_number' => 'require',
        'mileage_recorder' => 'require',
        'money' => 'require',
        'type' => 'require',
        'pay_type' => 'require',
        'fuel_amount' => 'require',
        'notes' => 'require',
        'maintenance_time' => 'require',
        'down_start_time' => 'require',
        'down_end_time' => 'require',
        'gas_time'=>'require',
        'add_time' => 'require',
        'update_time' => 'require',

    ];
    protected $message = [
        'id.require' => '不能为空',
        'no.require' => '编号不能为空',
        'car_plate_number.require' => '车牌号不能为空',
        'money.require' => '费用不能为空',
        'type.require' => '类型:1=加油,2=维修不能为空',
        'pay_type.require' => '支付方式:1=现金,2=充值卡不能为空',
        'fuel_amount.require' => '加油量不能为空',
        'notes.require' => '票据不能为空',
        'description.require' => '说明不能为空',
        'maintenance_time.require' => '维修时间不能为空',
        'down_start_time.require' => '停用开始时间不能为空',
        'down_end_time.require' => '停用结束时间不能为空',
        'gas_time.require'=>'加油时间不能为空',
        'add_time.require' => '不能为空',
        'update_time.require' => '不能为空',

    ];

    protected $scene = [
        'gas'  =>  ['fuel_amount','money','pay_type','gas_time','description'],
        'repair'=>['money','maintenance_time','description']
    ];
}